home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / telecom / 16 / pascal / fixpas.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-05-13  |  2.5 KB  |  84 lines

  1. {This program was sent to me, on a sheet of paper, from OSS after I had some
  2. problems with their Personal Pascal version 1.01.  It is supposed to fix all
  3. of the known bugs at the time and bring it up to working like version 1.02.
  4. The things it fixes are things like Delete_Dialog (which used to crash the
  5. system), Bring_To_Front, and a few other things.  I have used it to modify
  6. my copy of PPASCAL, and had no problems with it, except for very sluggish
  7. mouse clicking upon leaving Pascal, but the guy from OSS had never heard of
  8. this problem and so did not have a fix for it just yet.  To use this, compile
  9. it as a normal pascal program (GEM based) and put it on the A disk along with
  10. a COPY (NOT ORIGINAL) of your pascal system, including the files PASGEM and
  11.  
  12. COMPILER.PRG, which are the two it updates.  Run FIXPAS.PRG and it will do
  13. the update.  You can run it more than once without damage, but it won't do
  14. anything extra after the first time.  Be sure to keep a copy of the old version
  15. just in case something went wrong.  Please forgive the sloppy style of this
  16. program, but I was in a real hurry.  The original (on paper) was nicely
  17. commented and indented, but I wanted my system fixed NOW, so didn't bother to
  18. type the extra stuff in.  I am normally better than this, honest!  Good Luck.}
  19.  
  20. program fixpas;
  21. var f: packed file of byte;
  22. patch_pos:long_integer;
  23. procedure patch(old_val,new_val:byte);
  24. begin
  25. get(f,patch_pos);
  26. if (f^<>old_val)and(f^<>new_val) then begin
  27.   writeln('File doesn''t match: ',patch_pos:6:h,' ',f^:2:h);
  28.   halt
  29. end;
  30. f^:=new_val;
  31. put(f,patch_pos);
  32. patch_pos:=patch_pos+1;
  33. end;
  34. procedure patch_pasgem;
  35. begin
  36. reset(f,'pasgem');
  37. patch_pos:=11587;
  38. patch($0e,$0c);
  39. patch_pos:=11600;
  40. patch($5c,$58);
  41. patch_pos:=37094;
  42. patch($48,$38);
  43.  
  44. patch($c5,$05);
  45. patch($d1,$e5);
  46. patch($c5,$44);
  47. patch($d1,$d0);
  48. patch($c5,$c4);
  49. patch_pos:=37144;
  50. patch($67,$60);
  51. end;
  52. procedure patch_compiler;
  53. begin
  54. reset(f,'compiler.prg');
  55. patch_pos:=106550;
  56. patch($46,$7c);
  57. patch($61,$46);
  58. patch($74,$61);
  59.  
  60. patch($61,$74);
  61. patch($6c,$61);
  62. patch($20,$6c);
  63. patch($65,$20);
  64. patch($72,$65);
  65. patch_pos:=106559;
  66. patch($6f,$72);
  67. patch($72,$6f);
  68. patch($21,$72);
  69. patch($5d,$21);
  70. patch($5b,$20);
  71. patch($20,$5d);
  72. patch($41,$5b);
  73. patch($62,$41);
  74. patch($6f,$62);
  75.  
  76. patch($72,$6f);
  77. patch($74,$72);
  78. patch($20,$74);
  79. patch_pos:=122165;
  80. patch($01,$02);
  81. end;
  82. begin
  83. patch_pasgem;
  84. patch_compilerl;
  85. end.
  86.  
  87.  
  88. ə